<template>
  <div class="block">
    <el-pagination
      @current-change="handleCurrentChange"
      :page-size="pageSize"
      :current-page="currentPage"
      layout="total, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>
<script>
  export default {
    name:"Pages",
    data() {
      return {};
    },
    props: {
      pageSize: { type: Number, default: 10 },
      total: { type: Number, default: 15 },
      currentPage:{type: Number,default:1},
      pageNum:{type: Number,default:1}
    },
    methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.$emit('getInfo',`${val}`);
        this.$emit('returnPage',`${val}`);
      },
    },
  };
</script>
<style lang="scss" scoped></style>
